home *** CD-ROM | disk | FTP | other *** search
/ InfoMagic Internet Tools 1993 July / Internet Tools.iso / RockRidge / security / Watcher / find_pre_cmd.c < prev    next >
Encoding:
C/C++ Source or Header  |  1988-10-23  |  469 b   |  25 lines

  1. /*
  2.    find_cmd_prev: find the previous results for this command (if any).  If
  3.    there is no match, then we return NULL by falling through the loop.
  4.  
  5.    Kenneth Ingham
  6.  
  7.    Copyright (C) 1987 The University of New Mexico
  8. */
  9.  
  10. #include "defs.h"
  11.  
  12. struct old_cmd_st *
  13. find_cmd_prev(pipeline)
  14. char *pipeline;
  15. {
  16.     extern struct old_cmd_st *chead;
  17.     struct old_cmd_st *cp;
  18.  
  19.     cp = chead;
  20.     while (cp != NULL && strcmp(pipeline, cp->pipeline) != 0)
  21.         cp = cp->next;
  22.     
  23.     return cp;
  24. }
  25.